﻿<Window x:Class="StarField.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="350" Width="525" KeyDown="Window_KeyDown">
    <Canvas x:Name="StarField" Background="Black">
        <Ellipse x:Name="star1" Fill="LightGoldenrodYellow" Width="6" Height="6" Opacity="0.3" Canvas.Left="80">
            <Ellipse.Triggers>
                <EventTrigger RoutedEvent="Rectangle.Loaded">
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="star1" Storyboard.TargetProperty="(Canvas.Top)"
                                              From="0" To="350" Duration="00:00:3.00" RepeatBehavior="Forever"/>
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger>
            </Ellipse.Triggers>
            <Ellipse.BitmapEffect>
                <OuterGlowBitmapEffect GlowColor="Blue" GlowSize="30" Noise="1"
         Opacity="0.4" />
            </Ellipse.BitmapEffect>
        </Ellipse>
        <Ellipse x:Name="star2" Fill="LightGoldenrodYellow" Width="10" Height="10" Opacity="1" Canvas.Left="20">
            <Ellipse.Triggers>
                <EventTrigger RoutedEvent="Rectangle.Loaded">
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="star2" Storyboard.TargetProperty="(Canvas.Top)"
                                              From="0" To="350" Duration="00:00:1.00" RepeatBehavior="Forever"/>
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger>
            </Ellipse.Triggers>
        </Ellipse>
        <Ellipse x:Name="star3" Fill="LightGoldenrodYellow" Width="8" Height="8" Opacity="0.6" Canvas.Left="400">
            <Ellipse.Triggers>
                <EventTrigger RoutedEvent="Rectangle.Loaded">
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="star3" Storyboard.TargetProperty="(Canvas.Top)"
                                              From="0" To="350" Duration="00:00:1.50" RepeatBehavior="Forever"/>
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger>
            </Ellipse.Triggers>
        </Ellipse>
        <Ellipse x:Name="star4" Fill="Yellow" Width="10" Height="10" Opacity="1" Canvas.Left="300">
            <Ellipse.Triggers>
                <EventTrigger RoutedEvent="Rectangle.Loaded">
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="star4" Storyboard.TargetProperty="(Canvas.Top)"
                                              From="0" To="350" Duration="00:00:1.20" RepeatBehavior="Forever"/>
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger>
            </Ellipse.Triggers>
        </Ellipse>
        <Ellipse x:Name="star5" Fill="Red" Width="3" Height="3" Opacity="0.3" Canvas.Left="200">
            <Ellipse.Triggers>
                <EventTrigger RoutedEvent="Rectangle.Loaded">
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="star5" Storyboard.TargetProperty="(Canvas.Top)"
                                              From="0" To="350" Duration="00:00:4.00" RepeatBehavior="Forever"/>
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger>
            </Ellipse.Triggers>
        </Ellipse>
        <Ellipse x:Name="star6" Fill="LightGoldenrodYellow" Width="10" Height="10" Opacity="1" Canvas.Left="100">
            <Ellipse.Triggers>
                <EventTrigger RoutedEvent="Rectangle.Loaded">
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="star6" Storyboard.TargetProperty="(Canvas.Top)"
                                              From="0" To="350" Duration="00:00:1.10" RepeatBehavior="Forever"/>
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger>
            </Ellipse.Triggers>
        </Ellipse>
        <Ellipse x:Name="star7" Fill="Yellow" Width="6" Height="6" Opacity="0.6" Canvas.Left="330">
            <Ellipse.Triggers>
                <EventTrigger RoutedEvent="Rectangle.Loaded">
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="star7" Storyboard.TargetProperty="(Canvas.Top)"
                                              From="0" To="350" Duration="00:00:2.00" RepeatBehavior="Forever"/>
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger>
            </Ellipse.Triggers>
        </Ellipse>
        <Ellipse x:Name="star8" Fill="LightBlue" Width="5" Height="5" Opacity="0.5" Canvas.Left="150">
            <Ellipse.Triggers>
                <EventTrigger RoutedEvent="Rectangle.Loaded">
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="star8" Storyboard.TargetProperty="(Canvas.Top)"
                                              From="0" To="350" Duration="00:00:2.00" RepeatBehavior="Forever"/>
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger>
            </Ellipse.Triggers>
        </Ellipse>
        <Ellipse x:Name="star9" Fill="LightBlue" Width="4" Height="4" Opacity="0.4" Canvas.Left="450">
            <Ellipse.Triggers>
                <EventTrigger RoutedEvent="Rectangle.Loaded">
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="star9" Storyboard.TargetProperty="(Canvas.Top)"
                                              From="0" To="350" Duration="00:00:1.50" RepeatBehavior="Forever"/>
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger>
            </Ellipse.Triggers>
        </Ellipse>
        <Ellipse x:Name="star10" Fill="Purple" Width="8" Height="8" Opacity="0.4" Canvas.Left="250">
            <Ellipse.Triggers>
                <EventTrigger RoutedEvent="Rectangle.Loaded">
                    <BeginStoryboard>
                        <Storyboard>
                            <DoubleAnimation Storyboard.TargetName="star10" Storyboard.TargetProperty="(Canvas.Top)"
                                              From="0" To="350" Duration="00:00:1.90" RepeatBehavior="Forever"/>
                        </Storyboard>
                    </BeginStoryboard>
                </EventTrigger>
            </Ellipse.Triggers>
        </Ellipse>
        <Image x:Name="StarShip" Source="Img\spaceship.png" Width="30" Canvas.Bottom="0" Canvas.Left="285"/>
        <Image x:Name="StarShip2" Source="Img\spaceship2.png" Width="30" Canvas.Bottom="0" Canvas.Left="185"/>
    </Canvas>
</Window>
